Skip to content

feat(libs): resolve command-buffer flip buffers when the GPU reaches the flip - #2204

Merged
adriadam10 merged 1 commit into
boykopovar:mainfrom
XairRrR:feat/videoout-deferred-flip-buffer
Oct 10, 2026
Merged

adriadam10 merged 1 commit into
boykopovar:mainfrom
XairRrR:feat/videoout-deferred-flip-buffer

Conversation

@XairRrR

@XairRrR XairRrR commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

What

Uncharted: Legacy of Thieves Collection (PPSA05684) stops on main with:

VideoOut: flip buffer is not registered

Its renderer submits a DCB flip of buffer 0 while another thread waits for sceVideoOutIsFlipPending to reach 0 before registering the buffers. The buffer was looked up when the command buffer was submitted; it is now resolved in FlipRequest::GpuReady, when the GPU reaches the flip. A flip whose buffer is still unregistered then presents black and completes (flip event, count, flipPendingNum). The console's behaviour in that case is unknown and recorded in TechnicalDebt.

Tested

Arch Linux, GCC 16.2.1, NVIDIA GeForce RTX 4070 Ti SUPER (driver 615.71.09).

  • The branch alone on current main (d70b899): tools/check_conventions.py passes; of the 513 ctest tests all pass except agc_driver_dcc_keys_first_write, which fails the same way on main (an unchanged pending image was uploaded again). agc_driver_storage_cache_budget passes run alone; under ctest -j8 a local 3 GB RSS limit stopped it.
  • Uncharted: Legacy of Thieves Collection (PPSA05684): with this and the other changes of its bring-up, the title boots past the stop quoted above and reaches its main menu.
  • the new video_out_flip_tests modes deferred and unregistered pass, run by hand (the binary is not registered in ctest).

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes

@popcoder565

Copy link
Copy Markdown
Contributor

Native Windows run, since no Windows results were posted. Setup: Windows 10 (19045), RTX 3060 Laptop (NVIDIA 616.92), MinGW-w64 GCC 15.2.0 (WinLibs r7), Release. Head 9695f2c8, merged onto main d70b899 in one build with 33 other AGC/shader PRs that had no Windows run.

No title was run.

🤖 Addressed by Claude Code

@github-actions github-actions Bot added the needs rebase Conflicts with main, rebase needed label Oct 9, 2026
@oneandonlydean

Copy link
Copy Markdown
Collaborator

This conflicts with main after today's merges; could you rebase? It passed testing and is otherwise ready.

…the flip

A flip packet names a buffer index; the buffer was looked up when the
command buffer was submitted, so a title that registers its buffers
after submitting the first frame failed with "flip buffer is not
registered". The buffer is now resolved when the GPU reaches the flip,
as the hardware does. A flip whose buffer is still unregistered then
presents black and completes (see TechnicalDebt).

Uncharted: Legacy of Thieves Collection (PPSA05684) submits its first flip before registering its buffers and stopped with "flip buffer is not registered".
@adriadam10

Copy link
Copy Markdown
Collaborator

Rebased onto current main as @oneandonlydean asked (conflicts in VideoOutDriver.cpp with the overlay-bus/CheckAlive changes, the mode list in tests/Flip.cpp, and a TechnicalDebt adjacency). The PR's logic is unchanged.

Checked after the rebase: libSceVideoOut build + ctest (10/10), and video_out_flip_tests modes deferred, unregistered and overlay run by hand pass. Without the src change, deferred and unregistered fail with VideoOut: flip buffer is not registered. Windows result from @popcoder565 above. Merging on green CI.

@adriadam10
adriadam10 force-pushed the feat/videoout-deferred-flip-buffer branch from 9695f2c to c9fe124 Compare October 10, 2026 07:56
@adriadam10
adriadam10 merged commit 034dd75 into boykopovar:main Oct 10, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs needs rebase Conflicts with main, rebase needed prx

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants